<?php $this->load->view('common/dpc-head');?>
<?php $this->load->view('common/dpc-header');?>
<h1 id="top-coupon-title" class="text-center" style="color:#F45435;text-shadow:2px 2px 2px #51245F;font-weight:400;">Top Discount Promo Codes</h1>
<?php $this->load->view('common/dpc-top-search');?>
<div role="main">
	<div class="browse-a-z">
                <h2>Browse Stores By Alphabet</h2>
                <ul>
                        <li><a href="/all-promo-codes/0-9">0-9</a></li>
                                    <?php for($a=65;$a<=90;$a++){ ?>
                                        <li><a href="/all-promo-codes/<?php echo chr($a);?>"><?php echo chr($a);?></a></li>
                                        <?php }?>
                </ul>
                <div style="clear:both;"></div>
            </div>
            <div style="clear:both;"></div>            
            <div class="stripe-regular">
              <div class="row">
                
                <div class="large-9 columns">
                                    
                  <div id="top-coupons" class="coupons-wrapper">
                    <div class="row">
                      <div class="large-8 columns">
                        <h2>Top Promo Codes <span>- <?php echo $count=count($topCouponsArray); ?> result<?php if($count>1){ ?>s<?php } ?></span></h2>
                      </div>
                    </div>
                    
                    <ul class="rr items-landscape">
                    <?php foreach($topCouponsArray as $temp){ ?>
                      <li class="wrapper-3">
                        <div class="row">
                          <div class="large-4 small-12 columns">
                            <figure><a href="/coupon.php/<?php echo $temp['coupon_id']; ?>/<?php echo $temp['store_id']; ?>" target="_blank" rel="nofollow">
                              <img src="
										<?php if(isset($temp['coupon_image']) && $temp['coupon_image']!=''){ echo $temp['coupon_image'];}
										else { echo $temp['store_image'];}?>
										" alt="<?php echo $temp['store_name'];?> promo code" style="box-shadow:0px 0px 2px #A049BB;border-radius:3px;border:0;">
								<?php if($temp['coupon_type']=='FeaturedCpn'){?>
									<img src="/public/images/featured2.png" style="position:absolute;left:13px;border-radius:3px;" />
								<?php }?></a>
                            </figure>
                          </div>
                          <div class="large-5 small-8 columns">
                            <div class="col-middle">
                              <h2 class="alt"><?php echo $temp['coupon_name'];?> - <span style="font-weight:normal;color:#0099FF;font-size:14px;"><?php echo $temp['store_name'];?></span></h2>
                              <p class="text secondary">
                                <?php echo $temp['coupon_description'];?>
                              </p>
                            </div>
                          </div>
                          <div class="large-3 small-4 columns">
                            <div class="col-right">
                              <p class="value secondary"><?php if($temp['coupon_off_in']=='Percentage'){ echo $temp['coupon_off_by'].' %';}else{ echo 'Rs '.$temp['coupon_off_by'];}?> <?php if($temp['coupon_offer_only']=='Yes'){ echo 'offer';}else{ echo 'off';}?></p>
                              <h6><?php echo $temp['diff'];?> days left</h6>
                              <a href="javascript:void(0);" rel="nofollow" class="input button red secondary responsive" id="showCoupon<?php echo $temp['coupon_id']; ?>" onclick="showCouponCode('<?php echo $temp['coupon_id']; ?>','<?php echo $temp['store_id']; ?>')">Show Coupon</a>
                              <span class="input button border secondary responsive" id="couponCode<?php echo $temp['coupon_id']; ?>" style="display:none;"><?php echo $temp['coupon_code'];?></span>
                            </div>
                          </div>
                        </div>
                      </li>
                      <?php } ?>
                    </ul>
                  </div>
                  
                </div>

                <aside class="large-3 columns main-sidebar bg">
                  <?php if(isset($bannersArray) && !empty($bannersArray)){?>
                  <div id="banner" class="video-box small" style="margin:0px 0 10px 0;">
                    <a href="<?php echo $bannersArray[0]['banner_link'];?>" target="_blank" rel="nofollow"><img src="<?php echo $bannersArray[0]['banner_image'];?>" alt="<?php echo $bannersArray[0]['banner_alt'];?>" border="0" /></a>
                  </div>
                  <?php }?>
                  
                  <div class="testimonials-box flexslider" style="margin:0;">
                    <ul class="rr">
                      <li>
                        <div class="testimonial">
                          <div class="wrapper-5" id="catTag">
                          	<h3>Related Categories</h3>
                          	<ul id="related-categories">
                          	<?php foreach($relatedCat as $other){?>
                          		<li>
                          			<a href="/<?php echo $other['parent_url'].'/'.$other['category_url'];?>"><?php echo $other['category_name'];?></a>
                          		</li>
                          	<?php }?>
                          	<div style="clear: both;"></div>
                          	</ul>
                          </div>
                        </div>
                      </li>
                    </ul>
                  </div>
                
                </aside>

              </div>
            </div>
            
          </div>
<?php $this->load->view('common/dpc-footer');?>
